Matplotlib Tutorial¶

Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. This line graph are plotted many points.

An introduction to Matplotlib.

python logo

index type
1 matplotlib
2 plotly
3 seaborn
In [4]:
import matplotlib.pyplot as plt
In [5]:
fig, ax = plt.subplots()  # Create a figure containing a single axes.
ax.plot([1, 2, 3, 4,5], [1, 4, 10, 3,-15])  # Plot some data on the axes.
Out[5]:
[<matplotlib.lines.Line2D at 0x1993448e090>]

Plotly Tutorial¶

Plotly's Python graphing library makes interactive, publication-quality graphs. This graph is scatter plots. Scatter plots with variable-sized circular markers are often known as bubble charts.

An introduction to Plotly.

In [1]:
import plotly.express as px
import plotly
plotly.offline.init_notebook_mode()
df = px.data.iris()
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
                 size='petal_length', hover_data=['petal_width'])
fig.show()

Seaborn Tutorial¶

Seaborn is a library for making statistical graphics in Python. This graph shows how the signal changes depending on the timepoint. (statistical estimation)

An introduction to Seaborn.

In [2]:
import seaborn as sns
sns.set_theme(style="darkgrid")

# Load an example dataset with long-form data
fmri = sns.load_dataset("fmri")

# Plot the responses for different events and regions
sns.lineplot(x="timepoint", y="signal",
             hue="region", style="event",
             data=fmri)
Out[2]:
<Axes: xlabel='timepoint', ylabel='signal'>